package com.newgrand.controller;

import com.alibaba.fastjson.JSONObject;
import com.newgrand.service.impl.OrgService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhanglixin
 * @Data: 2022/11/18 17:20
 * @Description: TODO
 */
@Slf4j
@Api(tags = "手工同步用")
@RestController
@RequestMapping("/org")
public class OrgController {

    @Autowired
    private OrgService orgService;
    @RequestMapping(value = "/syncOrg", method = RequestMethod.GET)
    public @ResponseBody
    Object SyncOrg() throws Exception {
        try{
            orgService.SyncData();
            return null;
        }catch (Exception ex){
        }
        return null;
    }
}
